package com.itic.appbase.applications.sys.resource.persistence.dao;

import java.util.List;

import com.itic.appbase.applications.sys.resource.persistence.basedao.ResourceMapper;
import com.itic.appbase.applications.sys.resource.persistence.model.Resource;
import com.itic.appbase.applications.sys.resource.persistence.model.ResourceExample;
import com.itic.appbase.applications.sys.resource.persistence.model.ResourceStat;
import com.itic.appbase.framework.common.annotation.IticDBDao;
import com.itic.appbase.framework.common.persistence.dao.CrudDao;

@IticDBDao
public interface ResourceDao
        extends ResourceMapper, CrudDao<Resource, ResourceExample> {

    /**
     * 按资源类别统计资源数量
     * 
     * @return List<ResourceStat>
     */
    // TODO 统计类是否基于索引？
    List<ResourceStat> statByType(Resource resource);

    /**
     * 查询资源树
     * 
     * @param region
     * @return List<Resource>
     */
    List<Resource> selectResourceList(Resource resource);

    /**
     * 查询资源树id集合
     * 
     * @param Resource
     * @return List<String>
     */
    List<String> selectResourceIdList(Resource resource);
}